echo "开始安装x-ui"
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
echo "下载必要文件"
curl -o config.json https://gitee.com/shiqi100/x-ui/raw/master/config.json
chmod +x config.json
echo "启动x-ui 进程"
runuser -l root -c 'nohup /usr/local/x-ui/bin/xray-linux-amd64 -c /root/config.json &'
echo "添加开机自启"
curl -o rc.sh https://gitee.com/shiqi100/x-ui/raw/master/rc.sh
chmod +x /root/rc.sh
chmod +x /etc/rc.d/rc.local
echo /root/rc.sh >> /etc/rc.d/rc.local
echo "默认ip=本机IP"
echo "默认端口=20800"
echo "默认加密协议=aes-256-gcm"
echo "默认密码=aa321321"